#ifndef DATABASEMANAGER_H
#define DATABASEMANAGER_H
#include <QSqlDatabase>
#include <QSqlError>
#include <QDebug>

class DatabaseManager {
public:
    DatabaseManager();
    ~DatabaseManager();
    static QSqlDatabase& getDatabase();
    static void initUID(int id);
    static int&getUID();
    static void insert_history(QString task_name,QString task_type,int duration);
    static void insert_task(QString task_name,QString end_date);
private:
    static QSqlDatabase initDatabase();
    QSqlDatabase db;
    static int UID;

};

#endif // DATABASEMANAGER_H
